<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function getSum(a, b) {
            // let a = +prompt(`第一个数`)
            // let b = +prompt(`第二个数`)
            //  a 和b不需要做声明
            // a = +prompt(`第一个数`)
            // b = +prompt(`第二个数`)
            let sum = a + b
            document.write(`${sum}`)
        }
        getSum(1, 2)
    </script>
</body>

</html>